package edu.ucla.cs.typecast.app.news;

import java.io.*;

import junit.framework.TestCase;

public class ScriptParserTestCase extends TestCase {
	protected final String goodScript = "wait 1" + "\n" + "send class java.lang.String content \"String content\" rate 1 duration 10" + "\n";

	public void testSend() throws IOException, ClassNotFoundException {
		ScriptParser p = new ScriptParser() {
			protected void send(Class cls, String content, Integer rate, Integer duration) {
				assertEquals(String.class, cls);
				assertEquals("String content", content);
				assertEquals((Integer) 1, rate);
				assertEquals((Integer) 10, duration);
			}
		};
		p.parse(goodScript, false);
	}
}
